package cn.legend.travel.guide.util;

import cn.legend.travel.guide.pojo.entity.User;
import cn.legend.travel.guide.pojo.po.GuideDetailPO;
import cn.legend.travel.guide.pojo.po.GuidePO;
import cn.legend.travel.guide.pojo.vo.GuideDetailVO;
import cn.legend.travel.guide.pojo.vo.GuideVO;
import org.springframework.beans.BeanUtils;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class GuideDetailPOToGuideDetailVOConvertor {
    public static GuideDetailVO convert(GuideDetailPO guideDetailPO){
        GuideDetailVO guideDetailVO = new GuideDetailVO();
        if(guideDetailPO == null){
            return guideDetailVO;
        }
        guideDetailVO.setUsername(guideDetailPO.getUsername());
        guideDetailVO.setContentDetails(guideDetailPO.getContent());
        guideDetailVO.setCreateTime(guideDetailPO.getCreateTime());
        guideDetailVO.setDestinationId(guideDetailPO.getDestinationId());
        guideDetailVO.setLevel(guideDetailPO.getLevel());
        guideDetailVO.setTravelDays(guideDetailPO.getTravelDays());
        guideDetailVO.setTravelTime(guideDetailPO.getTravelTime());
        guideDetailVO.setTravelImg(guideDetailPO.getUrl());
        guideDetailVO.setViewCount(guideDetailPO.getViewCount());
        guideDetailVO.setCommentCount(guideDetailPO.getCommentCount());
        guideDetailVO.setConsumptionPerPerson(guideDetailPO.getConsumptionPerPerson());
        guideDetailVO.setAvatar(guideDetailPO.getAvatar());
        guideDetailVO.setTitle(guideDetailPO.getTitle());
        guideDetailVO.setTravelPartner(guideDetailPO.getTravelPartner());
        guideDetailVO.setLikeCount(guideDetailPO.getLikeCount());
        return  guideDetailVO;
    }
}
